#include <iostream>

class Base {
public:
    virtual void f(void) {
        std::cout << "Base::f()" << std::endl;
    }
};

class Derived : public Base {
public:
    void f(void) {
        std::cout << "Derived::f()" << std::endl;
    }
};

int main(void)
{
    Base b;
    Derived d;

    b.f();
    d.f();
}